package com.fowo.api.model.routing.address;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 自发货地址簿 导入导出辅助模型 */
@Getter
@Setter
public class RoutingAddressExcelPo {

  @NotBlank(message = "地址名称不能为空")
  @Size(max = 50, message = "地址名称长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*地址名称")
  private String alias;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "地址类型")
  private String type;

  @Size(max = 50, message = "公司名称长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "公司名称")
  private String companyName;

  @Size(max = 50, message = "联系人长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "联系人")
  private String contacts;

  @Size(max = 50, message = "邮箱长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "邮箱")
  private String email;

  @Size(max = 50, message = "电话长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "电话")
  private String phone;

  @NotNull(message = "国家/地区不能为空")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*国家/地区")
  private String countryCountry;

  @ExcelIgnore
  @ExcelProperty(value = "*国家/地区")
  private Long country;

  @NotBlank(message = "省州不能为空")
  @Size(max = 50, message = "省州长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*省州")
  private String province;

  @Size(max = 50, message = "城市长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "城市")
  private String city;

  @Size(max = 50, message = "区长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "区")
  private String area;

  @Size(max = 50, message = "邮编长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "邮编")
  private String postCode;
}
